// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLCommentHint*;
// import com.alibaba.druid.sql.ast.SQLExpr*;
// import com.alibaba.druid.sql.ast.SQLLimit*;
// import com.alibaba.druid.sql.ast.SQLName*;
// import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
// import com.alibaba.druid.sql.ast.statement.SQLUpdateStatement;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.std::list;
#pragma once
#include <string>
#include <list>
#include "../../../../ast/statement/SQLUpdateStatement.h"
#include "MySqlStatement.h"

class SQLLimit;
class SQLName;
class SQLCommentHint;
class SQLExpr;

class MySqlUpdateStatement : public SQLUpdateStatement, virtual public MySqlStatement
{
public:
  SQLLimit_ptr limit;

  BOOL_ptr lowPriority;
  BOOL_ptr ignore;
  BOOL_ptr commitOnSuccess;
  BOOL_ptr rollBackOnFail;
  BOOL_ptr queryOnPk;
  SQLExpr_ptr targetAffectRow;

  // for petadata
  BOOL_ptr forceAllPartitions;
  SQLName_ptr forcePartition;

  SQLCommentHint_list_ptr hints;

  MySqlUpdateStatement();
  SHAREDOBJECT(MySqlUpdateStatement);

  SQLLimit_ptr getLimit();

  void setLimit(SQLLimit_ptr limit);

  void accept0(SQLASTVisitor_ptr visitor);

  void accept0(MySqlASTVisitor_ptr visitor);

  BOOL_ptr isLowPriority();

  void setLowPriority(BOOL_ptr lowPriority);

  BOOL_ptr isIgnore();

  void setIgnore(BOOL_ptr ignore);

  BOOL_ptr isCommitOnSuccess();

  void setCommitOnSuccess(BOOL_ptr commitOnSuccess);

  BOOL_ptr isRollBackOnFail();

  void setRollBackOnFail(BOOL_ptr rollBackOnFail);

  BOOL_ptr isQueryOnPk();

  void setQueryOnPk(BOOL_ptr queryOnPk);

  SQLExpr_ptr getTargetAffectRow();

  void setTargetAffectRow(SQLExpr_ptr targetAffectRow);

  bool equals(Object_ptr o);

  int hashCode();

  SQLName_ptr getForcePartition();

  void setForcePartition(SQLName_ptr x);

  BOOL_ptr isForceAllPartitions();

  void setForceAllPartitions(BOOL_ptr forceAllPartitions);

  int getHintsSize();

  SQLCommentHint_list_ptr getHints();

  void setHints(SQLCommentHint_list_ptr hints);

  virtual string_ptr getClass() { return make_string_ptr("MySqlUpdateStatement"); }
};
